POV-Ray : Newsgroups : povray.unofficial.patches : 360 degrees with isosurface? : Re: 360 degrees with isosurface? Server Time
2 Sep 2024 16:21:35 EDT (-0400)
  Re: 360 degrees with isosurface?  
From: SamuelT 
Date: 11 Dec 1999 15:12:11
Message: <3852B1D6.EBABC753@aol.com>
Actually, I was able to encase the first three parts in abs( ) functions to
shorten it. The remaining three were deleted. It worked well, but I don't think
it helped the rendering time, only my editor space :)

Chris Huff wrote:

> In article <38529FAA.9A53DEA1@aol.com>, "SamuelT." <STB### [at] aolcom>
> wrote:
>
> > Cool! Thanks Chris! I'll get started on this stuff soon and might post my
> > progress at the images section. The only drawback about this, is that the
> > parser might get "bored" like it has in the past when using large
> > functions.
>
> Well, much of the code is duplicated, you could separate it into a
> separate function to make it considerably shorter, something like this:
>
> //Makes one side of prism aligned in xz plane
> //Syntax is: PrismSide(angle, x, z) - distance
> #declare PrismSide =
> function {
>     z*sin(radians(x)) + y*cos(radians(x))
> }
>
> //Makes a hexagonal prism, the angles given
> //are the angles of the sides to each other
> isosurface {
>     function {
>        PrismSide(0, x, y) - 1)
>        &PrismSide(60, x, y) - 1)
>        &PrismSide(120, x, y) - 1)
>        &PrismSide(180, x, y) - 1)
>        &PrismSide(240, x, y) - 1)
>        &PrismSide(300, x, y) - 1)
>        &(abs(y) - 1)
>     }
>     threshold 0
>     clipped_by{box {<-5, -5, -15>, < 5, 5, 5>}}
>     accuracy 0.001
>     texture {ComYw}
> }
>
> --
> Chris Huff
> e-mail: chr### [at] yahoocom
> Web page: http://chrishuff.dhs.org/

--
Samuel Benge

E-Mail: STB### [at] aolcom

Visit the still unfinished isosurface tutorial: http://members.aol.com/stbenge


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.